package com.financing.platform.service.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IFaAutoRegisterToManagerDao;
import com.financing.platform.dto.FaAutoRegisterToManagerDTO;
import com.financing.platform.service.IFaAutoRegisterToManagerService;
/**
 * fa_auto_register_to_manager  
 * 自动分配流水 业务访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("faAutoRegisterToManagerService")
public class FaAutoRegisterToManagerServiceImpl implements IFaAutoRegisterToManagerService{

	@Autowired
	private IFaAutoRegisterToManagerDao faAutoRegisterToManagerDao;

	@Override
	public int insert(FaAutoRegisterToManagerDTO faAutoRegisterToManager) throws SQLException {
		return faAutoRegisterToManagerDao.insert(faAutoRegisterToManager);
	}

	@Override
	public void update(FaAutoRegisterToManagerDTO faAutoRegisterToManager) throws SQLException {
		faAutoRegisterToManagerDao.update(faAutoRegisterToManager);
	}

	@Override
	public void updateForce(FaAutoRegisterToManagerDTO faAutoRegisterToManager) throws SQLException {
		faAutoRegisterToManagerDao.updateForce(faAutoRegisterToManager);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		faAutoRegisterToManagerDao.delete(id);
	}
	
	@Override
	public List<FaAutoRegisterToManagerDTO> queryList(FaAutoRegisterToManagerDTO faAutoRegisterToManager) throws SQLException {
		return faAutoRegisterToManagerDao.queryList(faAutoRegisterToManager);
	}

	@Override
	public int queryListCount(FaAutoRegisterToManagerDTO faAutoRegisterToManager) throws SQLException {
		return faAutoRegisterToManagerDao.queryListCount(faAutoRegisterToManager);
	}

	@Override
	public FaAutoRegisterToManagerDTO loadById(Integer id) throws SQLException {
		return faAutoRegisterToManagerDao.loadById(id);
	}
 	@Override
	public FaAutoRegisterToManagerDTO queryListGetFirst(FaAutoRegisterToManagerDTO faAutoRegisterToManager)
			throws SQLException {
		 List<FaAutoRegisterToManagerDTO> queryList = queryList(faAutoRegisterToManager);
		 if(queryList==null||queryList.size()==0){
			 return new FaAutoRegisterToManagerDTO();
		 }
		 return queryList.get(0);
	}

	@Override
	public Map<String, Object> quqeryAutoUser(
			FaAutoRegisterToManagerDTO faAutoRegisterToManager)
			throws SQLException {
		return faAutoRegisterToManagerDao.quqeryAutoUser(faAutoRegisterToManager);
	}

	@Override
	public Map<String, String> queryCurrentMonthUser(
			FaAutoRegisterToManagerDTO faAutoRegisterToManager)
			throws SQLException {
		return faAutoRegisterToManagerDao.queryCurrentMonthUser(faAutoRegisterToManager);
	}
}
